#include "linux/platform_device.h"
#include "linux/module.h"
//#include "mach/pinctrl.h"


static struct platform_device tk100_red = {
    .name = "redlaser",
    .id = -1,
    .dev = {
        .platform_data = NULL,
    }
};

static struct platform_device mx28_leds_gpio = {

};


#include <linux/platform_device.h>
#include <linux/leds.h>
#include <linux/err.h>

static struct gpio_led mxs_gpio_leds[] = {
	{
		.name         = "led-red",
		// .gpio         = S3C2410_GPF4,
        .gpio = 50,
		.active_low   = 0,
	},
	{
		.name         = "led-ocid",
		// .gpio         = S3C2410_GPF5,
        .gpio = 33,
		.active_low   = 0,
	},
    {
		.name         = "led-pwr",
		// .gpio         = S3C2410_GPF5,
        .gpio = 34,
		.active_low   = 0,
	},
};




static struct gpio_led_platform_data mxs_gpio_led_data = {
	.leds         = mxs_gpio_leds,
	.num_leds     = ARRAY_SIZE(mxs_gpio_leds),
};




static struct platform_device mxs_leds_gpio_device= {
	.name  = "leds-gpio",
	.id    = -1,
	.dev = {
		.platform_data = &mxs_gpio_led_data,
	},
};




static struct platform_device *the_devices[]  __initdata= {
    // &tk100_red,
    &mxs_leds_gpio_device
};


int __init devices_init(void)
{
    platform_add_devices(the_devices, ARRAY_SIZE(the_devices));
}

void __exit devices_exit(void)
{
    // platform_device_unregister(&tk100_red);
    platform_device_unregister(&mxs_leds_gpio_device);
}

module_init(devices_init);
module_exit(devices_exit);

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("glink devices user space export");
